package com.aifund.common.config;

import org.springframework.context.annotation.Configuration;


//@Configuration
public class GrpcConfig {

//    private String host= "119.28.55.30";
//    private int port = 8972;
//
//    /**
//     * 阻塞
//     * @return
//     */
//    @Bean
//    RpcExchangeGrpc.RpcExchangeBlockingStub blockingStub(){
//        ManagedChannel channel = NettyChannelBuilder.forAddress(host, port)
//                .negotiationType(NegotiationType.PLAINTEXT)
//                .build();
//        RpcExchangeGrpc.RpcExchangeBlockingStub blockingStub = RpcExchangeGrpc.newBlockingStub(channel);
//        return blockingStub;
//
//    }
//
//    /**
//     * 异步
//     * @return
//     */
//    @Bean
//    RpcExchangeGrpc.RpcExchangeStub exchangeStub(){
//        ManagedChannel channel = NettyChannelBuilder.forAddress(host, port)
//                .negotiationType(NegotiationType.PLAINTEXT)
//                .build();
//        RpcExchangeGrpc.RpcExchangeStub exchangeStub = RpcExchangeGrpc.newStub(channel);
//        return exchangeStub;
//    }


}
